Ext.define('appfe.stockor.exec.form.ZenSelloutSuggestionGird', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.stockor.exec.form.ZenSelloutSuggestionGird',
    requires: [
        'appfe.stockor.exec.form.ZenSelloutSuggestionGirdController'
    ],
    controller: 'stockor.exec.form.ZenSelloutSuggestionGird',
    viewModel: {
        data: {
            execHold: {
                id: '',
                slimsymbol: '',
                stkname: ''
            }
        },
        stores: {
            zenSelloutSuggestionStore: {
                fields: [
                    { name: 'grade', type: 'string' },
                    { name: 'infoTime', type: 'date' },
                    { name: 'level', type: 'string' },
                    { name: 'tag', type: 'string' },
                    { name: 'summary', type: 'string' },
                    { name: 'memo', type: 'string' },
                    { name: 'comments', type: 'string' },
                    { name: 'createDate', type: 'date' },
                    { name: 'modifyDate', type: 'date' }
                ],
                autoLoad: false,
                remoteSort: true,
                proxy: {
                    type: 'ajax',
                    url: BizHttpAction.queryZenSelloutSuggestionBySlimsymbol.url,
                    reader: {
                        type: 'json',
                        rootProperty: 'data',
                        totalProperty: 'total',
                        successProperty: 'success'
                    },
                    simpleSortMode: true
                }
            }
        }
    },
    bind: {
        store: '{zenSelloutSuggestionStore}'
    },
    viewConfig: {
        trackOver: true, // 鼠标滑过当前行时, 反显
        stripeRows: true, // 行颜色白灰条纹间隔显示
        enableTextSelection: true, // 允许选择文本
        emptyText: '',
        deferEmptyText: false
    },
    //iconCls: 'x-fa fa-gears',
    animCollapse: false,
    collapsible: false,
    columnLines: true, // 表格分隔线
    border: false,
    autoLoad: false,
    // frame: true,
    //
    disableSelection: false,
    autoScroll: true,
    loadMask: true, // 显示数据加载中蒙层
    selModel: {
        type: 'checkboxmodel', //带选择框
        injectCheckbox: 0, //checkbox位于哪一列，默认值为0
        mode: 'SINGLE', //支持三种模式 'SINGLE' / 'SIMPLE' / 'MULTI'支持ctrl,shift的操作 
        allowDeselect: true, //mode: 'SINGLE'下才有效
        checkOnly: false //只能点击checkbox才能选中
    },
    columns: {
        defaults: {
            sortable: false,
            menuDisabled: true,
            //flex: 2
            defaults: {
                sortable: false,
                menuDisabled: true
            }
        },
        items: [
            { xtype: 'rownumberer', resizable: true }, //显示行数
            // { text: 'ID', width: 90, dataIndex: 'id' },
            // { text: '代码', width: 90, dataIndex: 'slimsymbol' },
            // { text: '名称', minWidth: 90, maxWidth: 550, dataIndex: 'name' },
            { text: '级别', width: 60, dataIndex: 'grade' },
            { text: 'Level', width: 60, dataIndex: 'level' },
            { text: 'Tag', width: 100, dataIndex: 'tag' },
            { text: 'Summary', width: 300, dataIndex: 'summary' },
            { text: 'Memo', width: 500, dataIndex: 'memo' },
            { xtype: 'datecolumn', text: '创建时间', width: 160, dataIndex: 'createDate', format: 'Y-m-d H:i:s' },
            { xtype: 'datecolumn', text: '修改时间', width: 160, dataIndex: 'modifyDate', format: 'Y-m-d H:i:s' },
            { text: '备注', flex: 1, dataIndex: 'comments', producesHTML: false }
        ]
    },
    dockedItems: [{/* 顶部信息栏 */
        xtype: 'panel',
        reference: 'top',
        dock: 'top',
        padding: '5 5 5 5',
        frame: true,
        autoScroll: true,
        layout: 'vbox',
        defaults: {
            xtype: 'container',
            layout: 'column',
            width: '100%',
            border: true
        },
        items: [{ // 第一行 container
            defaults: {
                margin: '0 5 5 5'
            },
            items: [
                { xtype: 'displayfield', bind: '<span style="font-weight:bold;font-size: 16px;color:#ff3333;">ID:{execHold.id},  简码:{execHold.slimsymbol},  名称:{execHold.stkname}&nbsp;&nbsp;</span> ', flex: 1 }
            ]
        }]
    }],
    listeners: {

    }
});